import {configureStore} from "@reduxjs/toolkit";

import menuReducer from './menuSlice'

// redux存储状态树
const store = configureStore({
    // 存放各个状态的reducer函数
    reducer: {
        menu: menuReducer
    },
})

export default store

// 定义状态类型
export type RootState = ReturnType<typeof store.getState>;
// 定义状态执行动作
export type AppDispatch = typeof store.dispatch;
